package com.mycompany.war;

import com.mycompany.entity.Pomodoro;
import com.mycompany.session.PomodoroSessionBean;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


@ManagedBean
@RequestScoped
public class PomodoroJSF {

    @EJB
    private PomodoroSessionBean pomodoroSessionBean;

    public String inicio() {
        System.out.println("INICIO");
        Pomodoro p = new Pomodoro();

        System.out.println("Muestra: ");
        pomodoroSessionBean.persist(p);

        System.out.println("el id: " + p.getId());

        return "login.xhtml";
    }


}
